﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration.Install;
using System.Linq;
using System.ServiceProcess;

namespace IVRJunctionModerationService
{
    [RunInstaller(true)]
    public partial class IVRJunctionModerationInstaller : System.Configuration.Install.Installer
    {
        public IVRJunctionModerationInstaller()
        {
            InitializeComponent();
            var processInstaller = new ServiceProcessInstaller();
            var serviceInstaller = new ServiceInstaller();

            //set the privileges
            processInstaller.Account = ServiceAccount.User;
            serviceInstaller.DelayedAutoStart = true;
            serviceInstaller.DisplayName = "IVR Junction- Moderation Service";
            serviceInstaller.StartType = ServiceStartMode.Manual;
            serviceInstaller.Description = " This service analyze the moderator actions on YouTube Channel."
            + " On the basis of moderators action, audio file corresponding to a video on YouTube is uploaded on " +
            "the DropBox folder in the laptop of NGO and updated in the local database of the NGO";

            //must be the same as what was set in Program's constructor
            serviceInstaller.ServiceName = "IVR Junction- Moderation Service";
            serviceInstaller.DelayedAutoStart = true;

            this.Installers.Add(processInstaller);
            this.Installers.Add(serviceInstaller);
        }
    }
}
